﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class camera2 : MonoBehaviour
{
    [SerializeField] float speed = 10;
    public GameObject Dog;
    public float limitRange1,limitRange2;
    void Update()
    {
        if (Dog.transform.position.x <=limitRange2 && Dog.transform.position.x >= limitRange1)
        {
            this.transform.position = new Vector3(Dog.transform.position.x,-0.5f, -10);
        }
    }
}
